package com.minimalist.common.entity.lindi.po;

import com.minimalist.common.config.mybatis.InsertFullColumnHandler;
import com.minimalist.common.config.mybatis.UpdateFullColumnHandler;
import com.minimalist.common.config.mybatis.bo.BaseEntity;
import com.mybatisflex.annotation.Table;

import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * 林地指标平台_交易申请操作表 实体类。
 *
 * @author 11987
 * @since 2025-04-24
 */
@Table(value = "LINDI_TRADE_APPLICATION_OPERATOR"
        , onInsert = InsertFullColumnHandler.class
        , onUpdate = UpdateFullColumnHandler.class)
public class LindiTradeApplicationOperator extends BaseEntity implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 交易申请操作ID
     */
    private Long tradeApplicationOperatorId;

    /**
     * 交易申请ID
     */
    private Long tradeApplicationId;

    /**
     * 操作内容
     */
    private String content;

    // 无参构造函数
    public LindiTradeApplicationOperator() {
        super();
    }

    // 全参构造函数
    public LindiTradeApplicationOperator(Long tradeApplicationOperatorId, Long tradeApplicationId, String content) {
        super();
        this.tradeApplicationOperatorId = tradeApplicationOperatorId;
        this.tradeApplicationId = tradeApplicationId;
        this.content = content;
    }

    // Getter和Setter方法
    public Long getTradeApplicationOperatorId() {
        return tradeApplicationOperatorId;
    }

    public void setTradeApplicationOperatorId(Long tradeApplicationOperatorId) {
        this.tradeApplicationOperatorId = tradeApplicationOperatorId;
    }

    public Long getTradeApplicationId() {
        return tradeApplicationId;
    }

    public void setTradeApplicationId(Long tradeApplicationId) {
        this.tradeApplicationId = tradeApplicationId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        LindiTradeApplicationOperator that = (LindiTradeApplicationOperator) o;
        return Objects.equals(tradeApplicationOperatorId, that.tradeApplicationOperatorId) &&
               Objects.equals(tradeApplicationId, that.tradeApplicationId) &&
               Objects.equals(content, that.content);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), tradeApplicationOperatorId, tradeApplicationId, content);
    }

    @Override
    public String toString() {
        return "LindiTradeApplicationOperator{" +
                "tradeApplicationOperatorId=" + tradeApplicationOperatorId +
                ", tradeApplicationId=" + tradeApplicationId +
                ", content='" + content + '\'' +
                "} " + super.toString();
    }

    // Builder类
    public static class Builder {
        private Long tradeApplicationOperatorId;
        private Long tradeApplicationId;
        private String content;

        public Builder tradeApplicationOperatorId(Long tradeApplicationOperatorId) {
            this.tradeApplicationOperatorId = tradeApplicationOperatorId;
            return this;
        }

        public Builder tradeApplicationId(Long tradeApplicationId) {
            this.tradeApplicationId = tradeApplicationId;
            return this;
        }

        public Builder content(String content) {
            this.content = content;
            return this;
        }

        public LindiTradeApplicationOperator build() {
            return new LindiTradeApplicationOperator(tradeApplicationOperatorId, tradeApplicationId, content);
        }
    }

    public static Builder builder() {
        return new Builder();
    }

}
